Micron Document




Comment (computer programming)
part 11/37 · 66.0 KB total
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
</resource>

Store resource data

Binary data may also be encoded in comments through a process known as binary-to-text encoding, although such practice is uncommon and typically relegated to external resource files.

Document development process

Sometimes, comments describe development processes related to the code. For example, comments might describe how to build the code or how to submit changes to the software maintainer.

Extend language syntax

Occasionally, code that is formatted as a comment is overloaded to convey additional information to the translator, such as conditional comments. As such, syntax that generally indicates a comment can actually represent program code; not comment code. Such syntax may be a practical way to maintain compatibility while adding additional functionality, but some regard such a solution as a kludge.cite-ref-20[20]

Other examples include interpreter directives:

• The Unix "shebang" – #! – used on the first line of a script to point to the interpreter to be used.
• "Magic comments" identifying the encoding a source file is using,cite-ref-21[21] e.g. Python's PEP 263.cite-ref-22[22]

The script below for a Unix-like system shows both of these uses:

#!/usr/bin/env python3
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────